package com.lin.fengxiu.model;

import com.lin.fengxiu.util.MapAndJson;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Map;

/**
 * @ClassName User
 * @Description TODO
 * @Author wushaopei
 * @Date 2021/3/20 7:54
 * @Version 1.0
 */
@AllArgsConstructor
@Entity
@Setter
@Getter
@Builder
@Where(clause = "delete_time is null")
public class User extends BaseEntity{
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    private String openid;
    private String nickname;
    private Long unifyUid;
    private String email;
    private String password;
    private String mobile;

    @Convert(converter = MapAndJson.class)
    private Map<String, Object> wxProfile;

    public User() {
    }
}
